/** FASSIT (Forms of Selective Attention in Intelligent Transportation Systems)
 * Computational Creativity and Digital Media
 * Cognitive and Media Systems Group
 * Centre for Informatics and Systems of the University of Coimbra (CISUC)
 *
 * Copyright (c) 2010-2013 University of Coimbra, Portugal
 * All rights reserved.
 */

package agent.Metrics.Surprise;

import poi.Surprise.SurpriseDaysOff;
import poi.Surprise.SurprisePrice;
import poi.Surprise.SurpriseSchedule;

/**
 * This class is used to create the Surprise values for the first POI in the
 * Train, where the Agent do not yet has knowledge in the database
 * 
 * @author Hernani Costa
 * @version 0.1 date: 3/12/2012
 */
public class FirstPOI {
	private SurpriseSchedule sSchedule;
	private SurpriseDaysOff sDaysOff;
	private SurprisePrice sPrice;

	/**
	 * ------------------------------------------------------------------------
	 * Constructor class
	 * ------------------------------------------------------------------------
	 */
	public FirstPOI() {
		creatingSurprisePrice();
		creatingSurpriseDaysOff();
		creatingSurpriseSchedule();
	}

	private void creatingSurprisePrice() {
		sPrice = new SurprisePrice(1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0);
		// sPrice = new SurprisePrice(0.25, 0.25, 0.5);
	}

	private void creatingSurpriseSchedule() {
		sSchedule = new SurpriseSchedule(1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0);
		// sSchedule = new SurpriseSchedule(0.4, 0.2, 0.4);

	}

	private void creatingSurpriseDaysOff() {

		double equal = (double) (1.0 / 7.0);
		sDaysOff = new SurpriseDaysOff(equal, equal, equal, equal, equal,
				equal, equal);
		// sDaysOff = new SurpriseDaysOff(0.1, 0.2, 0.15, 0.15, 0.2, 0.05,
		// 0.15);

	}

	// ------------------------------------------------------------------------
	// ------------------------GETs and SETs-----------------------------------
	// ------------------------------------------------------------------------

	public SurprisePrice getSurprisePrice() {
		return sPrice;
	}

	public SurpriseSchedule getSurpriseSchedule() {
		return sSchedule;
	}

	public SurpriseDaysOff getSurpriseDaysOff() {
		return sDaysOff;
	}

	/**
	 * ------------------------------------------------------------------------
	 * Returns a String with the Surprise values for the first POI
	 * ------------------------------------------------------------------------
	 */
	public String to_String() {
		String info = "Surprise values for the first POI\n\t"
				+ getSurprisePrice().to_String() + "\n\t"
				+ getSurpriseSchedule().to_String() + "\n\t"
				+ getSurpriseDaysOff().to_String();
		return info;
	}

	/**
	 * ------------------------------------------------------------------------
	 * Used to provide an example that exercises the functionality of the class.
	 * ------------------------------------------------------------------------
	 * 
	 * @param args
	 */
	// public static void main(String args[]) {
	// FirstPOI first = new FirstPOI();
	// System.err.println(first.to_String());
	//
	// }

}
